package com.data.exception;

import sun.security.util.Length;

public class LoginErr extends RuntimeException {

    public final ErroType erroType;

    public LoginErr(ErroType erroType) {
        super(erroType.getMassage());
        this.erroType = erroType;
    }

//    public ErroType getErroType() {
//        return erroType;
//    }

    public enum ErroType{

        NAME_SPECIAL_CHARACTERS("用户名字不能有特殊字符"),

        SPECIAL_UNLL("格式错误，不能为空"),

        NO_REPEAT_NAME("已经注册过来"),

        LENGTH_ERROR("密码不能小于六位和超过十五位"),
        MD5_PASSWORD("加密失败");
        private final String massage;

        ErroType(String massage) {
            this.massage = massage;
        }

        public String getMassage() {
            return massage;
        }
    }


}
